This invention relates to a reversal control method and apparatus in an electric discharge machine. More particularly, the invention relates to a control method and apparatus for reversing traveling direction and is suited for application to an electric discharge machine in which an electrode, held close to the surface of a workpiece, is moved into the workpiece to perform cutting while an electric discharge is produced across the electrode and the workpiece, thereby machining the workpiece into a shape similar to that of the electrode.
Electric discharge machines include two types. The first is a wire-cut electric discharge machine wherein a wire electrode is moved relative to a workpiece along a commanded path, thereby performing electric discharge machining. The second type is an electric discharge machine wherein an electrode of a prescribed shape, held close to the surface of a workpiece, is moved into the workpiece to perform cutting while an electric discharge is produced across the electrode and the workpiece, thereby machining into the workpiece a shape similar to that of the electrode.
FIG. 1 is a schematic explanatory view of the electric discharge machine. An electrode EP serving as a punch or a wire electrode punch, is supported by a spindle SP, and is fed for machining in the direction of the arrow by a servomotor, not shown. A voltage is applied by a power source PS across the electrode EP and a workpiece WK, which is to be machined into a die. Accordingly, when the electrode EP is advanced for machining while a minute gap is maintained between the workpiece WK and the electrode EP, the workpiece WK is machined into a shape similar to that of the electrode EP. An enlarged bore having a desired size can be readily machined in the workpiece WK by controlling, e.g., the machining pulses and energy. If necessary, the machining operation is carried out while the electrode EP is moved in an eccentric fashion, whereby an enlarged bore having the desired dimensions can be machined.
In the electric discharge machine of the above type, it is necessary to retract (reverse) the electrode immediately upon the generation of a short-circuit signal produced when the electrode EP contacts the workpiece WK. With the conventional arrangement, however, the electrode EP cannot be retracted immediately even if the direction of electrode movement is changed upon generation of the short-circuit signal.
FIG. 2 is a block diagram of the prior-art reversal control apparatus and is useful in understanding the foregoing problem. In FIG. 2, numeral 101 denotes a paper tape in which NC command data is punched. Numeral 102 denotes a control unit which causes a tape reader (not shown) to read in the numerical control (NC) data from the paper tape 101, and which decodes the read NC data, delivering, e.g., M, S and T (Miscellaneous, Spindle Speed, and Tool) function) commands to the machine (FIG. 1) through a magnetics unit not shown and a move command Zc to a pulse distributor 103. The pulse distributor 103 executes well-known pulse distribution computations on the basis of the move command Zc and generates distributed pulses P.sub.s at a frequency corresponding to a commanded speed. Numeral 104 designates a known accelerator/decelerator circuit which generates a train of pulses Pi by rectilinearly accelerating the pulse rate of the train of distributed pulses Ps at the start of the distributed pulse train and rectilinearly decelerating the pulses at the end of the distributed pulse train. Numeral 105 indicates a D.C. motor by which the electrode EP is fed for machining. Numeral 106 denotes a pulse coder which generates one feedback pulse FP each time the DC motor 105 rotates by a predetermined amount. Numeral 107 denotes an error calculating and storing unit comprising by, e.g., a reversible counter. The difference Er between the number of input pulses Pi received from the accelerator/decelerator circuit 104 and the number of feedback pulses FP received from the pulse coder 106 is output by the error unit 107. The error calculating and storing unit 107 may be constructed, as illustrated, of an arithmetic circuit 107a for calculating the difference Er between the numbers of pulses Pi and FP, and an error register 107b for storing the error Er. More specifically, assuming that the DC motor 105 is rotating in the forward or positive direction, the error calculating and storing unit 107 counts up the input pulses Pi each time one is generated and counts down the feedback pulses FP each time one is generated, the difference Er between the number of input pulses and feedback pulses being stored in the error register 107b. Numeral 108 denotes a digital/analog (D/A) converter for generating an analog voltage proportional to the content of the error register 107b, and numeral 109 a speed control circuit.
When the control unit 102 produces the move command Zc, the pulse distributor 103 executes a pulse distribution computation and provides the distributed pulses Ps. Upon receiving the pulses Ps, the accelerator/decelerator circuit 104 accelerates and decelerates the pulse rate thereof and applies the train of command pulses Pi to the error calculating and storing unit 107. Thus, the content of the error register 107b becomes non-zero, so that the DA converter 108 provides a voltage and the motor 105 is driven by the speed control circuit 109 and moves the electrode EP. When the motor 105 has rotated by a predetermined amount, the feedback pulse FP is generated by the pulse coder 106 and is applied to the error calculating and storing unit 107. The difference ER between the number of commanded pulses Pi and the number of feedback pulses FP is stored in the error register 107b. Thenceforth, the electrode EP is servocontrolled to make the difference Er approach zero, whereby the electrode EP is fed for machining and moved toward a target position.
As the electrode EP is being fed for machining, the electrode EP will contact the workpiece WK, causing a short-circuit signal SS to be produced. When this occurs, a retraction control operation is performed by the control unit 102 to apply a retraction command to the pulse distributor 103, calling for retraction of the electrode EP. The pulse distributor 103 responds to the retraction command by generating retraction or "back-up" pulses BS for movement in the direction opposite to the feed direction, which pulses step down the contents of the error register 107b to zero upon passage of a predetermined period of time. Thereafter, the electrode EP is retracted by the retraction pulses to break contact with the workpiece WK.
Thus, with the conventional arrangement of FIG. 2, the electrode EP will not begin to be retracted, despite generation of the short-circuit signal SS, until the state of the error register 107b becomes zero, this occuring after a predetermined length of time. In fact, since the state of the error register 107b is non-zero for the predetermined length of time following the generation of the short-circuit signal SS, the electrode EP will continue to advance until the zero state is attained. The result is a delay in the resumption of machining, thereby lengthening the time required for the machining process.